import { Icon } from 'antd';
import React from 'react';
import IconFont from '@/components/IconFont';
import Status from '@/components/Status';

function ProcessStatus({ status }) {
  switch (status) {
    case 0:
      return <Status type="success">执行成功</Status>;
    case 1:
      return <Status type="warning">业务异常</Status>;
    case 2:
      return <Status type="error">程序异常</Status>;
    case 3:
      return (
        <>
          <IconFont className="mr-5" type="icon-Network-Error" style={{ color: '#1890ff' }} />
          网络异常
        </>
      );
    case 4:
      return (
        <>
          <IconFont className="mr-5" type="icon-circle-sync" />
          重演成功
        </>
      );
    default:
      return `未知情况`;
  }
}

export default ProcessStatus;
